package example.pattern.visitor;

public class Main {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		Directory root = new Directory("root");
		Directory sub1 = new Directory("sub1");
		Directory sub2 = new Directory("sub2");
		root.addDirectory(sub1);
		root.addDirectory(sub2);
		File file = new File("rootfile",1000);
		File file1 = new File("file1",2000);
		File file2 = new File("file2",500);
		root.addFile(file);
		sub1.addFile(file1);
		sub2.addFile(file2);
		root.acceptVisitor(new EntryVisitor());
	}

}
